<#-- 导入变量定义文件 -->
<#include "../template/include/assign.ftl">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>商品详情页</title>
<#-- 导入静态资源文件 -->
<#include "../template/include/source.ftl">
<link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css" />
<style type="text/css">
	.page{
		float:right;
		padding-top: 15px;
		margin-right: 15px;
	}
</style>
</head>
<#include "../template/template_listPage.ftl">
<body class="list">
	<script type="text/javascript">	
	function showRecharge(id,faceValue,operationCode,phoneType,code){
    $('#tr' + id).toggle();	
    var txt=  $('#div' + id).text();
    if(txt==""){
    //idx 用于层的编号
		$.post("${web_base}/recharge/phone_recharge!viewRecharge.htm?idx="+id+'&r.faceValue='+faceValue+'&r.operationCode='+operationCode+'&r.phoneType='+phoneType+'&r.area='+code,
		{},function(data){
	    $("#div" + id).html(data);
	  });
	  }
    }	
	</script>
	<div class="body">
		<div class="listBar">
			<h1><span class="icon">&nbsp;</span>商品详情</h1>
		</div>
		<form id="validateForm" class="validate" method="post" action="">
		<input type="hidden" name="productId" value="${id!}">	
		<table class="listTable">
			<tr>
				<th>
					<span class="sort">商品名称</span>
				</th>
				<th>
					<span class="sort">面值</span>
				</th>	
				<th>
					<span class="sort">区域名称</span>
				</th>	
				<th>
					<span class="sort">运营商名称</span>
				</th>	
				<th>
					<span class="sort">号码类型</span>
				</th>
				<th>
					<span class="sort">操作</span>
				</th>										
			</tr>
		<#if  productViewList??&&(productViewList?size gt 0) >
		<#list productViewList as entry>
			<tr>
				<td>
					${(entry.name)!}
				</td>	
				<td>
					${money((entry.faceValue)!)}
				</td>
				<td>
					${(entry.areaName)!}
				</td>	
				<td>
					${operationMethod((entry.operationCode)!)!}
				</td>
				<td>
					${phoneTypeMethod((entry.phoneType)!)!}
				</td>
				<td>
					<span onclick="showRecharge('${entry_index!}','${money((entry.faceValue)!)}','${(entry.operationCode)!}','${(entry.phoneType)!}','${(entry.code)!}')" class="spanLink">查看通道</span>
				</td>
			</tr>
			<tr id="tr${entry_index!}" style="display:none">
			    <td colspan="6"><div id="div${entry_index!}"><img src="${web_static}/admin/images/loading.gif" /></div>
			    </td>
			</tr>
		</#list>
		</#if>
		</table>
		</form>
	</div>
</body>
</html>
